Integrand size = 23, antiderivative size = 71 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {b} (a+b) \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{5/2} f}-\frac {(a+b) \cos (e+f x)}{a^2 f}+\frac {\cos ^3(e+f x)}{3 a f} \]
-(a+b)*cos(f*x+e)/a^2/f+1/3*cos(f*x+e)^3/a/f+(a+b)*arctan(cos(f*x+e)*a^(1/ 2)/b^(1/2))*b^(1/2)/a^(5/2)/f
Result contains complex when optimal does not.
Time = 2.21 (sec) , antiderivative size = 376, normalized size of antiderivative = 5.30 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \left (3 \left (a^2+8 a b+8 b^2\right ) \arctan \left (\frac {\left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+3 \left (a^2+8 a b+8 b^2\right ) \arctan \left (\frac {\left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )-3 a^2 \arctan \left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-3 a^2 \arctan \left (\frac {\sqrt {a}+\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+4 \sqrt {a} \sqrt {b} \cos (e+f x) (-5 a-6 b+a \cos (2 (e+f x)))\right ) \sec ^2(e+f x)}{48 a^{5/2} \sqrt {b} f \left (a+b \sec ^2(e+f x)\right )} \]
((a + 2*b + a*Cos[2*(e + f*x)])*(3*(a^2 + 8*a*b + 8*b^2)*ArcTan[((-Sqrt[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e] *(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b] ] + 3*(a^2 + 8*a*b + 8*b^2)*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[ (Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]] - 3*a^2*ArcTan[(Sqrt[a] - S qrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]] - 3*a^2*ArcTan[(Sqrt[a] + Sqrt[a + b ]*Tan[(e + f*x)/2])/Sqrt[b]] + 4*Sqrt[a]*Sqrt[b]*Cos[e + f*x]*(-5*a - 6*b + a*Cos[2*(e + f*x)]))*Sec[e + f*x]^2)/(48*a^(5/2)*Sqrt[b]*f*(a + b*Sec[e + f*x]^2))
Time = 0.24 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4621, 363, 262, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (e+f x)^3}{a+b \sec (e+f x)^2}dx\) |
\(\Big \downarrow \) 4621 |
\(\displaystyle -\frac {\int \frac {\cos ^2(e+f x) \left (1-\cos ^2(e+f x)\right )}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 363 |
\(\displaystyle -\frac {\frac {(a+b) \int \frac {\cos ^2(e+f x)}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{a}-\frac {\cos ^3(e+f x)}{3 a}}{f}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle -\frac {\frac {(a+b) \left (\frac {\cos (e+f x)}{a}-\frac {b \int \frac {1}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{a}\right )}{a}-\frac {\cos ^3(e+f x)}{3 a}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {\frac {(a+b) \left (\frac {\cos (e+f x)}{a}-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{3/2}}\right )}{a}-\frac {\cos ^3(e+f x)}{3 a}}{f}\) |
-((-1/3*Cos[e + f*x]^3/a + ((a + b)*(-((Sqrt[b]*ArcTan[(Sqrt[a]*Cos[e + f* x])/Sqrt[b]])/a^(3/2)) + Cos[e + f*x]/a))/a)/f)
3.1.29.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x _Symbol] :> Simp[d*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(b*e*(m + 2*p + 3))), x] - Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(b*(m + 2*p + 3)) Int[(e*x)^ m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b*c - a*d , 0] && NeQ[m + 2*p + 3, 0]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 2] && IntegerQ[n] && IntegerQ[p]
Time = 0.49 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {\frac {a \cos \left (f x +e \right )^{3}}{3}-\cos \left (f x +e \right ) a -b \cos \left (f x +e \right )}{a^{2}}+\frac {b \left (a +b \right ) \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{a^{2} \sqrt {a b}}}{f}\) | \(67\) |
default | \(\frac {\frac {\frac {a \cos \left (f x +e \right )^{3}}{3}-\cos \left (f x +e \right ) a -b \cos \left (f x +e \right )}{a^{2}}+\frac {b \left (a +b \right ) \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{a^{2} \sqrt {a b}}}{f}\) | \(67\) |
risch | \(-\frac {3 \,{\mathrm e}^{i \left (f x +e \right )}}{8 a f}-\frac {{\mathrm e}^{i \left (f x +e \right )} b}{2 a^{2} f}-\frac {3 \,{\mathrm e}^{-i \left (f x +e \right )}}{8 a f}-\frac {{\mathrm e}^{-i \left (f x +e \right )} b}{2 a^{2} f}+\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 a^{2} f}+\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right ) b}{2 a^{3} f}-\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 a^{2} f}-\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right ) b}{2 a^{3} f}+\frac {\cos \left (3 f x +3 e \right )}{12 f a}\) | \(275\) |
1/f*(1/a^2*(1/3*a*cos(f*x+e)^3-cos(f*x+e)*a-b*cos(f*x+e))+b*(a+b)/a^2/(a*b )^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1/2)))
Time = 0.27 (sec) , antiderivative size = 154, normalized size of antiderivative = 2.17 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {2 \, a \cos \left (f x + e\right )^{3} + 3 \, {\left (a + b\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, {\left (a + b\right )} \cos \left (f x + e\right )}{6 \, a^{2} f}, \frac {a \cos \left (f x + e\right )^{3} + 3 \, {\left (a + b\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) - 3 \, {\left (a + b\right )} \cos \left (f x + e\right )}{3 \, a^{2} f}\right ] \]
[1/6*(2*a*cos(f*x + e)^3 + 3*(a + b)*sqrt(-b/a)*log(-(a*cos(f*x + e)^2 + 2 *a*sqrt(-b/a)*cos(f*x + e) - b)/(a*cos(f*x + e)^2 + b)) - 6*(a + b)*cos(f* x + e))/(a^2*f), 1/3*(a*cos(f*x + e)^3 + 3*(a + b)*sqrt(b/a)*arctan(a*sqrt (b/a)*cos(f*x + e)/b) - 3*(a + b)*cos(f*x + e))/(a^2*f)]
Timed out. \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\text {Timed out} \]
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.89 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {3 \, {\left (a b + b^{2}\right )} \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {a \cos \left (f x + e\right )^{3} - 3 \, {\left (a + b\right )} \cos \left (f x + e\right )}{a^{2}}}{3 \, f} \]
1/3*(3*(a*b + b^2)*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2) + (a*c os(f*x + e)^3 - 3*(a + b)*cos(f*x + e))/a^2)/f
Time = 0.29 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.20 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {{\left (a b + b^{2}\right )} \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2} f} + \frac {a^{2} f^{5} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{5} \cos \left (f x + e\right ) - 3 \, a b f^{5} \cos \left (f x + e\right )}{3 \, a^{3} f^{6}} \]
(a*b + b^2)*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2*f) + 1/3*(a^2* f^5*cos(f*x + e)^3 - 3*a^2*f^5*cos(f*x + e) - 3*a*b*f^5*cos(f*x + e))/(a^3 *f^6)
Time = 0.12 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.07 \[ \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {{\cos \left (e+f\,x\right )}^3}{3\,a\,f}-\frac {\cos \left (e+f\,x\right )\,\left (\frac {b}{a^2}+\frac {1}{a}\right )}{f}+\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,\cos \left (e+f\,x\right )\,\left (a+b\right )}{b^2+a\,b}\right )\,\left (a+b\right )}{a^{5/2}\,f} \]